// add a controller
app.controller('ctrl', function ($scope, $http) {
    // bind UI
    var data = {};
    data.PID = "000004";
    $scope.data = data;
    data.domain = "HinaTest1&2.16.840.1.113883.3.72.5.9.1401&ISO";
    $scope.submit = function () {
        var json = JSON.stringify(data);
        $.ajax({
            type: "post",
            url: "query-patient/submit",
            data: json,
            contentType: "application/json; charset=utf-8",
            dataType: "json",
            success: function (responseData) {
                $scope.PIDList = responseData;
                $scope.$apply();
            },
            error: function (XMLHttpRequest, textStatus, errorThrown) {

            },
            beforeSend: function (XMLHttpRequest) {
                XMLHttpRequest.setRequestHeader("app-platform", "android");
            }
        });



    }
});